package com.ftf.tp.user.application.eventHandler;

;
import com.ftf.tp.user.domain.action.event.ActionEvent;
import com.ftf.tp.user.application.service.ActionApplicationService;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;

import javax.annotation.Resource;

/**
 * 点赞消息消费
 *
 * @author tanghao
 * @date 2022/8/25
 */
public class ActionEventHandler {

    @Resource
    private ActionApplicationService actionApplicationService;


    @Async("userTaskExecutor")
    @EventListener
    public void handleEvent(ActionEvent event) {
        actionApplicationService.save(event);
    }

}
